package com.api.core.domain.query.score;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.util.Date;

@Data
public class DatColScoreQuery {
    private String datCol;
    private String datColName;
    @JsonIgnore
    private String datColLabel;
    private Double score;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dateTime;
    @JsonIgnore
    private String appLang;

//    public void initLabelValue() throws Exception {
//        String strAppLang = StringUtils.isNotBlank(appLang) ? appLang : LanguageBean.getInitLang();
//        if (StringUtils.isNotBlank(datColLabel)) {
//            this.datColName = LanguageBean.getLangJsonObj(strAppLang, datColLabel);
////            System.out.println(this.datColName);
//        }
//    }

//    public DatColScoreQuery(String datCol, String datColName, String datColLabel, Double score, Date dateTime, String appLang) {
//        String strAppLang = StringUtils.isNotBlank(appLang) ? appLang : LanguageBean.getInitLang();
//        if (StringUtils.isNotBlank(datColLabel)) {
//            try {
//                this.datColName = LanguageBean.getLangJsonObj(strAppLang, datColLabel);
//            } catch (Exception e) {
//                throw new RuntimeException(e);
//            }
//        }
//        this.datCol = datCol;
////        this.datColName = datColName;
//        this.datColLabel = datColLabel;
//        this.score = score;
//        this.dateTime = dateTime;
//        this.appLang = appLang;
//    }
}
